import fetch from "common/src/utils/fetch";

/**
 *download 文件
 */
function downloadFile(path) {
  return fetch({
    url: "/api/electionservice/examinationMethod/download?path=" + path,
    method: "get"
  });
}

/**
 * 获取 key
 */
function getResultByKey(key) {
  return fetch({
    url: "/api/electionservice/examinationMethod/result/" + key,
    method: "get"
  });
}

/**
 *导出
 */
function exportData(data) {
  return fetch({
    url: "/api/electionservice/examinationMethod/export",
    method: "post",
    data: data
  });
}

const pageUrl = "/api/electionservice/examinationMethod/examinationMethodQuery";

export default {
  exportData: exportData,
  getResultByKey: getResultByKey,
  downloadFile: downloadFile,
  pageUrl: pageUrl
};
